#!/bin/sh

# log_df_pg
# File ID: ae7b949c-5d3e-11df-a56b-90e6ba3022ac

[ -e /carmbb.mrk ] || exit 0;

logdir=$HOME/log

[ -r $logdir/.disks ] || { echo "$logdir/.disks finnes ikke, avbryter." >&2; exit 1; }

df -P `cat $logdir/.disks` | grep / | perl -pe 's/^/now() /;' | tr -s ' ' | tr -d '%' | psql df -c "copy df from stdin delimiter ' '"
